// Copyright 2008 Senary
// See credits.txt for details.

// This file is part of Omega VII.

// Omega VII is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// Omega VII is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Omega VII.  If not, see <http://www.gnu.org/licenses/>.

#pragma once

#include <windows.h>
#include <vector>

#include "sdk_engine/adll.h"
#include "TopPanel.h"
#include "PlanetPanel.h"
#include "SpaceshipPanel.h"

class SpaceObject;

//singleton class
class UIManager
{
private:
	static UIManager* _pInstance;

	// All the panels that are present in this UI
	TopPanel _topPanel;
	PlanetPanel _planetPanel;
	SpaceshipPanel _spaceshipPanel;
	std::vector<ImagePanel*> _decorationPanels;
	
	UIManager(void);
public:
	~UIManager(void);

	//singleton method
	static UIManager* getInstance();

	// Initialises the panels
	void initialize();

	// Displays the info window for a specific unit
	void displayRightPanel(SpaceObject * unit);

	// Undisplays the right panel
	void hideRightPanel();

	void addDecorationPanel(ImagePanel* ip);

	// param timestep: time since the last update, in seconds
	// param totalTime: total time the game has been running
	void update(float timestep, float totalTime);

};
